<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #d1 {
        width: 100px;
        height: 50px;
        background-color: red;
        position: absolute;
        /* 设置显示层级 */
        z-index: 1;
      }
      #d2 {
        width: 50px;
        height: 100px;
        background-color: blue;
        position: absolute;
        z-index: 0;
      }
    </style>
  </head>
  <body>
    <div id="d1"></div>
    <div id="d2"></div>
  </body>
</html>
